<div id="fixed-sidebar-right">
    <div class="moduletable login">
        <i class="fa fa-user"></i>
        <div class="login_box">
            @if (auth()->check())
                <h5 class="heading-style-5">{{ $user->name }}</h5>
                <form action="" method="post" id="login-form" class="form-inline">
                    <div class="mod-login_userdata">
                        <div id="form-login-username" class="control-group">
                            <div class="controls">
                                <div>
                                    <a role="menuitem" tabindex="-1" href="">我的设置</a>
                                </div>
                                @if (auth()->user()->is_admin)
                                <div>
                                    <a role="menuitem" tabindex="-1" href="{{ url("admin") }}">系统管理</a>
                                </div>
                                @endif
                                <div>
                                    <a role="menuitem" tabindex="-1" href="{{ url("logout") }}">退出登录</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            @else
                <h5 class="heading-style-5">登录或注册</h5>
                <form action="" method="post" id="login-form" class="form-inline">
                    <input type="hidden" name="_token" value="{{ csrf_token() }}"/>

                    <div class="mod-login_userdata">
                        <div id="form-login-username" class="control-group">
                            <div class="controls">
                                <div class="input-prepend">
                                    <input id="modlgn-name" type="text" name="name" class="input-small placeholder"
                                           tabindex="1" size="18" placeholder="用户名" required="">
                                </div>
                            </div>
                        </div>
                        <div id="form-login-password" class="control-group">
                            <div class="controls">
                                <div class="input-prepend">
                                    <input id="modlgn-passwd" type="password" name="password"
                                           class="input-small placeholder" tabindex="2" size="18" placeholder="密码"
                                           required="">
                                </div>
                            </div>
                        </div>
                        <div class="mod-login_submit">
                            <button type="button" tabindex="3" name="Submit" class="btn btn-primary fixed-login">登录
                            </button>
                            <a class="btn btn-primary register" href="reg">注册</a>
                        </div>
                        <label for="mod-login_remember107" class="checkbox">
                                    <span class="checkbox">
                                        <input id="mod-login_remember107" class="mod-login_remember" type="checkbox"
                                               name="remember" value="yes">
                                        <label class="checkbox_inner" for="mod-login_remember107"></label>
                                    </span>
                            记住我
                        </label>
                    </div>
                </form>
            @endif
                <script>
                    jQuery(function ($) {
                        $('.moduletable.login>i.fa-user').click(function () {
                            $('.moduletable.login').toggleClass('shown')
                        });
                    })
                </script>
        </div>
    </div>
</div>
<div id="style_switcher" class="hidden">
    <div class="toggler"></div>
    <p>请选择皮肤颜色</p>
    <ul id="color-box">
        <li class="firstItem"><div class="color_scheme color_scheme_1" data-scheme="color_scheme_1">&nbsp;</div></li>
        <li class="active"><div class="color_scheme color_scheme_2" data-scheme="color_scheme_2">&nbsp;</div></li>
        <li><div class="color_scheme color_scheme_3" data-scheme="color_scheme_3">&nbsp;</div></li>
        <li class="lastItem"><div class="color_scheme color_scheme_4" data-scheme="color_scheme_4">&nbsp;</div></li>
    </ul>
</div>
<div id="back-top" style="display: block;">
    <a href="#"><span></span> </a>
</div>